package entity

import (
	"go.mongodb.org/mongo-driver/bson/primitive"
	"gorm.io/gorm"
)

type GameM struct {
	gorm.Model
	ID     int64  `gorm:"primaryKey;autoIncrement" json:"ID"`
	Name   string `gorm:"column:name" json:"name"`
	Appid  string `gorm:"column:appid" json:"appid"`
	Secret string `gorm:"column:secret" json:"secret"`
}

func (m *GameM) TableName() string {
	return "sy_games"
}

type EventLog struct {
	Id        primitive.ObjectID `bson:"_id,omitempty"`
	Uid       int64              `bson:"uid"`
	Event     string             `bson:"event"`
	EventDate int64              `bson:"event_date"`
	EventH    int64              `bson:"event_h"`
	EventTime int64              `bson:"event_time"`
	Gid       int64              `bson:"gid"`
	Account   string             `bson:"account"`
	RegTIme   int64              `bson:"reg_time"`
	RegDate   int64              `bson:"reg_date"`
	Ip        string             `bson:"ip"`
	Province  string             `bson:"province"`
	City      string             `bson:"city"`
	Dsid      string             `bson:"dsid"`
	Drid      string             `bson:"drid"`
	Drname    string             `bson:"drname"`
	Drlevel   string             `bson:"drlevel"`
	Ua        string             `bson:"ua"`
}

func (e *EventLog) TableName() string {
	return "event_log"
}
